package com.zwan.oam_rtc.utils.messages;

public class Const {
  public final static int MAX_MSG_LEN = 8192;
  public final static int MAX_MSG_BODY_LEN = MAX_MSG_LEN-128;
  public final static int MAX_MPMSG_LEN = 1400;
  public final static int MAX_PNO = 400; //pno < MAX_PNO
  public final static int MIN_PNO = 260; //pno>=MIN_PNO
  public final static int MAX_SOCKET_SERVER_NUM = 20;
  public final static int MAX_SOCKET_CLIENT_NUM = 20;
  public final static int MAX_SOCKET_NUM = MAX_SOCKET_SERVER_NUM + MAX_SOCKET_CLIENT_NUM;
  public final static int MAX_RESEND_NUM = 200;

  public final static int MAX_SERVER_NUM = 133;
  public final static int MIN_SERVER_NUM = 129;
  public final static int MAX_CLIENT_NUM = 254;
  public final static int MIN_CLIENT_NUM = 134;
  public final static int MIN_AREA_CODE = 10;
  public final static int MAX_AREA_CODE = 999;
  public final static int MAX_POST_NUM = 254;
  public final static int MAX_MP_NODE = 64;

  public final static int MAX_PENDING_CONNECTS = 8;
  public final static int MAX_MAINTAIN_POST_NUM = 32;
  public final static int MAX_RECEIVE_ERROR_NUM = 30;
  public final static int RECEIVE_BUFFER_LEN = 2048;
  public final static int NAME_LEN = 20;
  public final static int MAX_APPLICATION_WAIT_QUEUE_LEN = 100;

  public final static int R01_SUCCESS = 0;
  public final static int R01_PNO_ERROR = 3;
  public final static int R01_NAMEDTIMER_NO_DEFINE = 14;
  public final static int R01_OTHER_ERROR = 0xFF;
  public final static int BYTE8 = 0xff;
  public final static int BYTE16 = 0xffff;

  public final static int TIME_IDLE = 5 * 1000;
  public final static int INNER_TIME = 500;
  public final static int SEND_TO_PC = 1;
  public final static byte TCP_CHECK_TYPE = (byte) 0xFF;
  public final static int  TCP_CHECK_BODYLEN = 11;
  public final static int MSG_HEAD_LEN = 31; //byte
  public final static int MSG_BODY_0 = 30; //
  public final static int MAX_NOREPONSE_NUM = 4;
  //link-status
  public final static int LINK_SUCCESS = 0;
  public final static int LINK_FALSE = 1;
  public final static int WAIT_TO_CLOSE = 2;

  public final static short SLP_PNO = 4;
  public final static short SCP_MODULE = 133;

}
